package api

import (
	"app/api/auth"
	"app/api/customer"
	"app/api/greenhouse"
	"app/api/greenhouse_allocation_record"
	"app/api/medication_record"
	"app/api/orders"
	"app/api/payment_record"
	"app/api/seed_category"
	"app/api/seed_variant"
	"app/api/seedbed"
	"app/api/seedbed_allocation_batch_record"
	"app/api/seedbed_allocation_record"
	"app/api/seedling_record"
	"app/api/sowing_record"
	"app/api/task_record"

	"github.com/gin-gonic/gin"
)

func Init(group *gin.RouterGroup) {
	userGroup := group.Group("/users")
	auth.Init(userGroup)
	ordersGroup := group.Group("/orders")
	orders.Init(ordersGroup)
	customerGroup := group.Group("/customer")
	customer.Init(customerGroup)

	greenhouseGroup := group.Group("/greenhouse")
	greenhouse.Init(greenhouseGroup)

	greenhouseAllocationRecordGroup := group.Group("/greenhouse_allocation_record")
	greenhouse_allocation_record.Init(greenhouseAllocationRecordGroup)

	paymentRecordGroup := group.Group("/payment_record")
	payment_record.Init(paymentRecordGroup)

	seedCategoryGroup := group.Group("/seed_category")
	seed_category.Init(seedCategoryGroup)

	seedVariantGroup := group.Group("/seed_variant")
	seed_variant.Init(seedVariantGroup)

	seedbedGroup := group.Group("/seedbed")
	seedbed.Init(seedbedGroup)

	seedbedAllocationRecordGroup := group.Group("/seedbed_allocation_record")
	seedbed_allocation_record.Init(seedbedAllocationRecordGroup)

	seedbedAllocationBatchRecordGroup := group.Group("/seedbed_allocation_batch_record")
	seedbed_allocation_batch_record.Init(seedbedAllocationBatchRecordGroup)

	seedlingRecordGroup := group.Group("/seedling_record")
	seedling_record.Init(seedlingRecordGroup)

	sowingRecordGroup := group.Group("/sowing_record")
	sowing_record.Init(sowingRecordGroup)

	// 任务记录
	taskRecordGroup := group.Group("/task_record")
	task_record.Init(taskRecordGroup)
	// 用药记录
	medicationRecordGroup := group.Group("/medication_record")
	medication_record.Init(medicationRecordGroup)
}
